#include "StdAfx.h"
#include "NilKeyPlus.h"
CNilKeyPlus::CNilKeyPlus(void)
{
	for(int i = 0;i<SIZE;i++)
	{
		this->m_rgId[i] = RandUINT();
	}
}
CNilKeyPlus::CNilKeyPlus(const CNilKeyPlus& tmp)
:CNilKey(tmp)
{
};
CNilKeyPlus::~CNilKeyPlus(void)
{
}

void CNilKeyPlus::InverseBits(const int nBitNumber)
{
	vector<unsigned int >cPos;
	//CNilKey tmp(*this);
	GetRandomSequence(0,SIZE*sizeof(unsigned int)*8-1,nBitNumber,cPos);
	for(unsigned i = 0;i<cPos.size();i++)
	{
		this->ChangeBit(cPos[i]);
	}
	//assert(GetDistance(*this,tmp)==nBitNumber);
}
